package de.lindenvalley.ergo;

import util.AnotherFont;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class DescriptionActivity extends Activity implements View.OnClickListener {
	
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.description);
        AnotherFont.findTypeface((ViewGroup)getWindow().getDecorView());
        TextView buttonStart = (TextView) findViewById(R.id.textViewStart);
        buttonStart.setOnClickListener(this);
        View logo = findViewById(R.id.imageViewLogo);
        logo.setOnClickListener(this);
			
//        TextView descriptionTitle = (TextView) findViewById(R.id.textViewDescrTitle);
//        descriptionTitle.setText(Html.fromHtml(getString(R.string.descr_ergo)));
        
    }

	@Override
	public void onClick(View v) {
		int id = v.getId();
		Intent intent = null;
		
		switch (id) {
		case R.id.textViewStart:
			intent = new Intent (this, CameraActivity.class);
			startActivity(intent);
			break;
		case R.id.imageViewLogo:
			intent = new Intent (Intent.ACTION_VIEW, Uri.parse(getString(R.string.urlLink)));
			break;
		}
		
		if (intent != null){
			startActivity(intent);
		}
	}

}
